# Contributor: David Demelier <markand@malikania.fr>
# Maintainer: David Demelier <markand@malikania.fr>
pkgname=qjackctl
pkgver=0.6.3
pkgrel=0
pkgdesc="GUI interface for JACK"
url="https://qjackctl.sourceforge.io"
arch="all"
license="GPL-2.0-or-later"
makedepends="
	alsa-lib-dev
	cmake
	dbus-dev
	jack-dev
	portaudio-dev
	qt5-qtbase-dev
	qt5-qttools-dev
"
subpackages="$pkgname-doc"
source="https://sourceforge.net/projects/qjackctl/files/qjackctl/$pkgver/qjackctl-$pkgver.tar.gz
	set-version.patch"
options="!check" # No tests.

build() {
	if [ "$CBUILD" != "$CHOST" ]; then
		CMAKE_CROSSOPTS="-DCMAKE_SYSTEM_NAME=Linux -DCMAKE_HOST_SYSTEM_NAME=Linux"
	fi
	cmake -B build \
		-DCMAKE_INSTALL_PREFIX=/usr \
		-DCMAKE_INSTALL_LIBDIR=lib \
		-DBUILD_SHARED_LIBS=True \
		-DCMAKE_BUILD_TYPE=None \
		$CMAKE_CROSSOPTS .
	make -C build
}

package() {
	make -C build DESTDIR="$pkgdir" install
}

sha512sums="72a9218b3b8a6b72470656e774f5cfbfe6670059e9f1a85a394345f4689c5d5c05af23b5e37d5f8dfc6159e591f64249006936069dde1632ef9d74b6f8355e0b  qjackctl-0.6.3.tar.gz
685ac68260e90075f5600bd392db8f411712890534bffcf4c48b8541a9af613d19309b1911cc286d2da08290ab86f770856c386d72002d53dc2a0e615cabea57  set-version.patch"
